﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UFSSMaster.Master" AutoEventWireup="true" CodeBehind="usersubs.aspx.cs" Inherits="UFSSWebApp.usersubs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style5
        {
            width: 250px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageName" runat="server">
<%
    try
    {
        Response.Write("Subscription / " + Session["sub"].ToString());
    }
    catch
    {
        Response.Redirect("Error.aspx");
        //Response.Redirect("~/profile.aspx");
    }
 %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Body" runat="server">
    <div class="Box" style="width:500px">
        <span class="subheading"><% Response.Write(Session["sub"].ToString()); %> - Information</span><hr />
        <table>
            <tbody>
                <tr>
                    <td><b>Creator: </b></td>
                    <td><asp:LinkButton ID="lbtnCreator" runat="server" onclick="lbtnCreator_Click">
                    <%  try
                        {
                            Response.Write(Session["subcreator"].ToString());
                        }
                        catch
                        {
                            lbtnCreator.Enabled = false;
                        }
                         %>
                        </asp:LinkButton>
                    </td>
                </tr>
                <tr><td></td></tr>
                <tr>
                    <td><b>Files: </b></td>
                    <td><asp:Label ID="lblFiles" runat="server" Text=""></asp:Label></td>
                </tr>
                <tr><td></td></tr>
                <tr>
                    <td><b>Subscribers: </b></td>
                    <td><asp:Label ID="lblSubs" runat="server" Text=""></asp:Label></td>
                </tr>
                <tr><td></td></tr>
                <tr>
                    <td><b>Type: </b></td>
                    <td><asp:Label ID="lblType" runat="server" Text=""></asp:Label></td>
                </tr>
                <tr><td></td></tr>
                <tr>
                    <td><b>Latest File: </b></td>
                    <td>
                        <asp:LinkButton ID="lbtnFile" runat="server" onclick="lbtnFile_Click">
                        <% 
                            try
                            {
                                Response.Write(Session["latfile"].ToString());
                            }
                            catch
                            {
                                Response.Write("No file");
                                lbtnFile.Enabled = false;
                            }
                            %>
                        </asp:LinkButton>
                    </td>
                </tr>
                <tr><td></td></tr>
                <tr>
                    <td><b>Last Updated: </b></td>
                    <td><asp:Label ID="lblLastUp" runat="server" Text=""></asp:Label></td>
                </tr>
                <tr><td></td></tr>
                <tr>
                    <td align="center"><asp:Button ID="btnJoin" runat="server" Text="Join Subscription" 
                            onclick="btnJoin_Click" /></td>
                </tr>
            </tbody>
        </table>
        <table>
            <tbody>
                <tr>
                    <td class="style5"><span class="subheading">Files</span><hr /></td>
                    <td class="style5"><span class="subheading">Subscribers</span><hr /></td>
                </tr>
                <tr>
                    <td><asp:ListBox ID="lstFiles" runat="server" Height="116px" Width="179px" 
                            AutoPostBack="True" BackColor="#F0F4FF"></asp:ListBox></td>
                    <td><asp:ListBox ID="lstSubs" runat="server" Height="116px" Width="179px" 
                            AutoPostBack="True" BackColor="#F0F4FF"></asp:ListBox></td>
                </tr>
                <tr>
                    <td><asp:Button ID="btnViewFile" runat="server" Text="View File" 
                            onclick="btnViewFile_Click" /></td>
                    <td><asp:Button ID="btnViewProfile" runat="server" Text="View Profile" 
                            onclick="btnViewProfile_Click" /></td>
                </tr>
            </tbody>
        </table>
    </div>
</asp:Content>
